var express = require('express'),
    helper = require('../../libs/helper'),
    logger = require('../../libs/logger').logger,
    router = express.Router(),
    
    notesController = require('./notesController');


router.route('')
.get(notesController.getPageNotes(["ID", "Title", "substr(Narrative, 0, 60) Narrative", "CreateTime", "UpdateTime"]));

router.route('/add')
.post(notesController.addNote);

router.route('/:id([0-9]+)')
.get(notesController.getNote);

router.route('/update/:id([0-9]+)')
.post(notesController.updateNote);

router.route('/delete/:id([0-9]+)')
.get(notesController.deleteNote);


module.exports = router;